home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr52 / expand53.zip / XPDEMO.ZIP / XPMAIN.PRG < prev    next >
Text File  |  1992-08-21  |  1KB  |  48 lines

  1. * ------------------------------------------------------------------------
  2. * Module......:    XPMAIN.PRG
  3. * Title.......: MAIN part of the Expand Library Demonstration Program
  4. * Author......:    Pepijn Smits.
  5. * Date........:    July/August 1992
  6. * Copyright...:    (c)1992 by Softwarebureau Pepijn Smits
  7. * Notes.......:    Clipper 5.01 Demo of the Expand Library
  8. *        Contains the Main() procedure, which is called at startup..
  9. *        See XPDEMO.RMK For Compile and Link instructions.
  10. * ------------------------------------------------------------------------
  11.  
  12. Procedure Main()
  13. SetCancel(.f.)
  14. XPmouseSet(.t.)
  15. InitScreen()
  16. SetupScreen()
  17. SetupMenu()
  18. SetCursor(0)
  19.  
  20. // Install Our Inkey Hander
  21. XPinkeyBlock( {|n|XPdemoInkey(n)}, {||XPdemoInkey()})
  22.  
  23. // Go into the Menu Loop
  24. while .t.
  25.     MenuColor()
  26.     Eval(XPpullMenu())
  27. end
  28. Return
  29.  
  30. Procedure SetupScreen
  31. Local i
  32. MenuColor()
  33. DispBox(0,0,MaxRow(),MaxCol(),Replicate('░',9))
  34. /* Make a nice banner in the background */
  35. for i := 1 to 8 
  36.    @ i+3  , 8 say StrTran(XPbanner(i," Expand "),' ','░')
  37.    @ i+12 , 8 say StrTran(XPbanner(i,"Library!"),' ','░')
  38. next
  39. Return
  40.  
  41. Procedure InitScreen
  42. Local vMode := XPvmode()
  43. if XPfastPCX(PCXname())==0
  44.     XPmouseKey()
  45.     XPvmode(vMode)
  46. end
  47. Return
  48.